package com.liyu.iblog.service;

import java.util.List;

import com.liyu.iblog.domain.Blog;

public interface BlogService {
    
    public static final int BLOG_PAGINATION_SIZE = 10;
    public static final int BLOG_FIRST_RESULT_INDEX = 0;
    public static final String DEFAULT_BLOG_OWNER = "liyu";
    
    public void create(Blog blog);
    
    public Blog getBlogById(String id);
    
    public Blog getBlogWithComment(String id);
    
    public List<Blog> getAllBlogs();
    
    public List<Blog> getBolgsWithTimeDescOrder(int firstIndex, int batchSize);
    
    public List<Blog> getBlogsByCategory(Object categoryId, int firstIndex, int batchSize);

    public List<Blog> getBlogsByTag(String tagId, int firstIndex, int batchSize);
    
    public void updateBlog(Object oldBlogId, Blog newBlog);
    
    public void deleteBlog(Object id);
}
